<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\validate;

use think\Validate;

//验证上传产品
class GoodsValidate extends Validate
{
    protected $rule = [
        'parent_id' => 'require|number',
        'g_name'  => 'require|length:1,40',
        'basics_money'  => 'require',
    ];

    protected $message = [
        'parent_id' => '分类必须是数字',
        'g_name'  => '名称必须是1-40位字符',
        'basics_money'  => '请填写价格',
    ];

}